import java.util.Scanner;

public class Jingqu {
    public static void main(String[] args) {
        Youke s=new Youke();
        Scanner sa=new Scanner(System.in);
        boolean isFlag=true;
        while (isFlag){
            System.out.println("请输入姓名：");
            String a=sa.next();
            s.name=a;
            System.out.println("请输入年龄：");
            int b=sa.nextInt();
            s.age=b;
            s.show();
            if (s.age<=14){
                System.out.println("门票免费");
            }else if (s.age>=15&&s.age<60){
                System.out.println("门票为20");
            }else if (s.age>=60){
                System.out.println("门票半价，为10元");
            }else if (s.name=="n"){
                System.out.println("退出程序");
                isFlag=false;
            }
        }
    }
}
